<HTML>
<CENTER><A HREF = "http://sparta.sandia.gov">SPARTA WWW Site</A> - <A HREF = "Manual.html">SPARTA Documentation</A> - <A HREF = "Section_commands.html#comm">SPARTA Commands</A> 
</CENTER>






<HR>

<H3>collide command 
</H3>
<P><B>Syntax:</B>
</P>
<PRE>collide style args keyword value ... 
</PRE>
<UL><LI>style = <I>none</I> or <I>vss</I> 

<LI>args = arguments for that style 

<PRE>  <I>none</I> args = none
  <I>vss</I> args = mix-ID file
    mix-ID = ID of mixture to use for group definitions
    file = filename that lists species with their VSS model parameters
  <I>vss/kk</I> args = mix-ID file
    mix-ID = ID of mixture to use for group definitions
    file = filename that lists species with their VSS model parameters 
</PRE>
<LI>zero or more keyword/value pairs may be appended 

<LI>keyword = <I>relax</I> 

<PRE>  <I>relax</I> value = <I>constant</I> or <I>variable</I> 
</PRE>

</UL>
<P><B>Examples:</B>
</P>
<PRE>collide none
collide vss all ../data/air.vss
collide vss species all.vss relax variable 
</PRE>
<P><B>Description:</B>
</P>
<P>Define what style of particle-particle collisions will be performed by
SPARTA each timestep.  If collisions are performed, particles are
sorted into grid cells every timestep and the appropriate collision
model is invoked on a per-grid-cell basis.  Collisions alter the
velocity of participating particles as well as their rotational and
vibrational energies.  The rotational and vibrational properties of
each species are set in the file read by the <A HREF = "species.html">species</A>
command.
</P>
<P>The collision style determines how many pairs of particles are
considered for collisions, the criteria for which collisions actually
occurs, and the outcome of individual collision, which alters the
velocities of the two particles.  If chemistry is enabled, via the
<A HREF = "react.html">react</A> command, particles involved in collisions may also
change species, or a particle may be deleted, or a new particle
created.  The <A HREF = "collide_modify.html">collide_modify</A> command can also be
used to alter aspects of how collisions are performed.  For example,
it can be used to turn on/off the tracking of vibrational energy and
its exchange in collisions.
</P>
<P>A <I>mix-ID</I> argument is specified for each collision style.  It must
contain all the species defined for use by the simulation, via the
<A HREF = "species.html">species</A> command.  The group definitions in the mixture
assign one or more particle species to each group.  These groupings
are used to determine how pairs of particles are chosen to collide
with each other, in the following manner.
</P>
<P>Consider a cell with N particles and a mixture with M groups.  Based
on its species, each particle is assigned to one of the M groups.
Each unique pair of groups is considered, including each group paired
with itself.  For each pair of groups a value <I>Nattempt</I> 
(see equation 11.3 in <A HREF = "#Bird94">(Bird94)</A>) is calculated  
which is the number of collisions to attempt.  This is a function of
N1 and N2 (the number of particles in each group), the grid cell
volume, and other parameters of the collision style.
</P>
<P>For each collision attempt, a random pair of particles is selected,
with one particle from each group.  Whether the collision occurs or
not is a function of the relative velocities of the two particles,
their respective species, and other parameters of the collision
style; see equation 11.4 in <A HREF = "#Bird94">(Bird94)</A>.
</P>
<P>NOTE: If you are using the ambipolar approximation with charged
species, as described in <A HREF = "Section_howto.html#howto_11">Section 6.11</A>,
and you have used the <A HREF = "collide_modify.html">collide_modify ambipolar
yes</A> command to enable ambipolar collisions (not
required), and you are using a mixture ID with multiple groups, then
the ambipolar electron species must be in a group by itself.
</P>
<HR>

<P>The <I>none</I> style means that no particle-particle collisions will be
performed, i.e. the simulation models free-molecular flow.
</P>
<HR>

<P>The <I>vss</I> style implements the Variable Soft Sphere (VSS) model for
collisions.  As discussed below, with appropriate parameter choices,
it can also compute the Variable Hard Sphere (VHS) model and the Hard
Sphere (HS) model.  See chapters 2.6 and 2.7 in <A HREF = "#Bird94">(Bird94)</A> for
details.
</P>
<P>In DSMC, the variable-soft-sphere (VSS) interaction of <A HREF = "#Koura92">Koura and
Matsumoto</A> and the variable-hard-sphere (VHS) interaction of
<A HREF = "#Bird94">Bird</A> are used to approximate molecular interactions.  Both
models yield transport properties proportional to a power (omega) of
the gas temperature.  This temperature dependence of the transport
properties is similar to the Inverse Power Law model (IPL) for which
Chapman-Enskog theory provides closed form solutions for the transport
properties.
</P>
<P>Both VSS and VHS interactions define parameters <I>diam</I> = molecular
diameter, which is a function of the molecular speed, and <I>alpha</I> =
angular-scattering parameter, which relates the scattering angle to
the impact parameter.  Setting <I>alpha</I> = 1 produces isotropic (hard
sphere) interactions, which converts the VSS model into a VHS model.
</P>
<P>The <I>file</I> argument is for a collision data file which contains
definitions of VSS model parameters for some number of species.
Example files are included in the data directory of the SPARTA
distribution, with a "*.css" suffix.  The file can contain species not
used by this simulation; they will simply be ignored.  All species
currently defined by the simulation must be present in the file.
</P>
<P>The format of the file depends of the setting of the optional <I>relax</I>
keyword, as explained below.  Comments or blank lines are allowed in
the file.  Comment lines start with a "#" character.  All other lines
must have the following format with parameters separated by
whitespace.
</P>
<P>If the <I>relax</I> keyword is specified as <I>constant</I>, which is the
default, then each line has 4 parameters following the species ID:
</P>
<PRE>species-ID diam omega tref alpha 
</PRE>
<P>The species-ID is a string that will be matched to one of the species
defined by the simulation, via the <A HREF = "species.html">species</A> command.
The meaning of additional properties is as follows:
</P>
<UL><LI>diam = VHS or VSS diameter of particle (distance units)
<LI>omega = temperature-dependence of viscosity (unitless)
<LI>tref = reference temperature (temperature units)
<LI>alpha = angular scattering parameter (unitless) 
</UL>
<P>The methodology for deriving VSS/VHS parameters from these properties
is explained in Chapter 3 of <A HREF = "#Bird94">(Bird94)</A>.  Parameter values for
the most common gases are given in Appendix A of the same book.  These
values are based on the first-order approximation of the
Chapman-Enskog theory.  Infinite-order parameters are described in
<A HREF = "#Gallis04">(Gallis04)</A>.
</P>
<P>In the <I>constant</I> case rotational and vibrational relaxation during a
collision is treated in the same constant manner for every collision,
using the rotational and vibrational relaxation numbers from the
species data file, as read by the <A HREF = "species.html">species</A> command.
</P>
<P>If the <I>relax</I> keyword is specified as <I>variable</I>, then each line has
8 parameters following the species ID:
</P>
<PRE>species-ID diam omega tref alpha Zrotinf T* C1 C2 
</PRE>
<P>The first 4 parameters are the same as above.  Parameters 5 and 6
affect rotational relaxation; parameters 7 and 8 affect vibrational
relaxation.  In this case the rotational and vibrational relaxation
during a collision is treated as a variable and is computed for each
collision.  This calculation is only performed for polyatomic species,
using equations A5 and A6 on pages 413 and 414 in <A HREF = "#Bird94">(Bird94)</A>,
with the modification that the collision temperature is calculated
using energy in the internal mode as well as the translational mode.
Zrotinf and T* are parameters in the numerator and denominator of eq
A5.  C1 and C2 are in eq A6.  The units of these parameters is as
follows:
</P>
<UL><LI>Zrotinf (unitless)
<LI>T* (temperature units)
<LI>C1 (temperature units)
<LI>C2 (temperature^(1/3) units) 
</UL>
<P>Note that a collision data file with the 4 extra relaxation parameters
(per species) can be used when the <I>relax</I> keyword is specified as
<I>constant</I>.  In that case, the extra parameters are simply ignored.
</P>
<P>For interspecies collisions, the collision parameters default to
the average of the parameters for each involved species.  To override
this default, lines specific to each interspecies pair can be added
anywhere in the collision data file.  The format for these lines is as
described above, with the addition of a second species name.  For
example, with the <I>relax</I> keyword specified, an interspecies
collision line would contain the following information for collisions
between species-ID and species-ID1:
</P>
<PRE>species-ID species-ID1 diam omega tref alpha Zrotinf T* C1 C2 
</PRE>
<P>In an interspecies line, a specific parameter can be returned to the
default behavior (an average) by making it negative.  For example, to
override only <I>omega</I> for the above case, the line could appear as
follows:
</P>
<PRE>species-ID species-ID1 -1 omega -1 -1 -1 -1 -1 -1 
</PRE>
<HR>

<P>Styles with a <I>kk</I> suffix are functionally the same as the
corresponding style without the suffix.  They have been optimized to
run faster, depending on your available hardware, as discussed in the
<A HREF = "Section_accelerate.html">Accelerating SPARTA</A> section of the manual.
The accelerated styles take the same arguments and should produce the
same results, except for different random number, round-off and
precision issues.
</P>
<P>These accelerated styles are part of the KOKKOS package. They are only
enabled if SPARTA was built with that package.  See the <A HREF = "Section_start.html#start_3">Making
SPARTA</A> section for more info.
</P>
<P>You can specify the accelerated styles explicitly in your input script
by including their suffix, or you can use the <A HREF = "Section_start.html#start_6">-suffix command-line
switch</A> when you invoke SPARTA, or you can
use the <A HREF = "suffix.html">suffix</A> command in your input script.
</P>
<P>See the <A HREF = "Section_accelerate.html">Accelerating SPARTA</A> section of the
manual for more instructions on how to use the accelerated styles
effectively.
</P>
<HR>

<P><B>Restrictions:</B> none
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "collide_modify.html">collide_modify</A>, <A HREF = "mixture.html">mixture</A>,
<A HREF = "react.html">react</A>
</P>
<P><B>Default:</B>
</P>
<P>Style = none is the default (no collisions).  If the vss style is
specified, then relax = constant is the default.
</P>
<HR>

<A NAME = "Koura92"></A>

<P><B>(Koura92)</B> K. Koura and H. Matsumoto, "Variable soft sphere molecular
model for air species," Phys Fluids A, 4, 1083 (1992).
</P>
<A NAME = "Bird94"></A>

<P><B>(Bird94)</B> G. A. Bird, Molecular Gas Dynamics and the Direct
Simulation of Gas Flows, Clarendon Press, Oxford (1994).
</P>
<A NAME = "Gallis04"></A>

<P><B>(Gallis04)</B> M. A. Gallis, J. R. Torczynski, and D. J. Rader,
"Molecular gas dynamics observations of Chapman-Enskog behavior and
departures therefrom in nonequilibrium gases," Phys Rev E, 69, 042201
(2004).
</P>
</HTML>
